package com.clpms.dao.mapper;

import com.clpms.dao.pojo.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author caixinyong
 * @date 2023/5/5 9:34 PM
 */

@Mapper
public interface TeacherDao {

    Teacher selectByJobNumberAndPassword(@Param("jobNumber") String jobNumber,
                                         @Param("password") String password,
                                         @Param("schoolId") Long schoolId);

    List<Teacher> selectByKeyWord(@Param("keyWord") String keyWord, @Param("roleType") Integer roleType, @Param(
            "schoolId") Long schoolId);

    Long deleteById(@Param("teacherId") Long teacherId, @Param("schoolId") Long schoolId);

    Teacher selectByJobNumber(@Param("jobNumber") String jobNumber, @Param("schoolId") Long schoolId);

    Long insertList(@Param("teacherList") List<Teacher> teacherList);

    Teacher selectById(@Param("id") Long id, @Param("schoolId") Long schoolId);

    Long updateById(@Param("teacher") Teacher teacher);

    Long updatePasswordById(@Param("teacherId") Long teacherId,
                            @Param("schoolId") Long schoolId,
                            @Param("password") String password);
}
